<div id="bentrai">
  <div id="main-content">
    <div class="center-center">
      <div class="center2">
        <ul>
          <li><a href="/hang-khuyen-mai.html"><span>HÀNG KHUYẾN MÃI - GIẢM GIÁ</span></a></li>
        </ul>
      </div>
      <div class="oncenter2">
        <div class="khungspnb2">
          <?php
            $row_index  =   0;
            $i =1;
            $total_product  =   sizeof($data);
            foreach($data AS $row):
            if($row_index == 0){
                echo '<div class="lstProduct">';
            }
            ?>          <ul class="spnb1">
            <li class="imgs"><a href="/san-pham/chi-tiet/<?php echo $row['Product']['id']; ?>-<?php echo $row['Product']['alias']; ?>.html"><img src="<?php echo $product_image_thumb_url_path . $row['Product']['thumbnail']; ?>" /></a></li>
            <li class="tenhang"><a href="/san-pham/chi-tiet/<?php echo $row['Product']['id']; ?>-<?php echo $row['Product']['alias']; ?>.html"><?php echo $row['Product']['title']; ?><img src="/img/cf-1.gif" /></a></li>
            <li class="mahang"><?php echo $row['Product']['product_code']; ?></li>
            <?php if(!empty($row['Product']['price_promotion'])): ?>
            <li class="gia"><span style="font-size: 12px; color: rgb(102, 102, 102); text-decoration: line-through;"><?php echo $row['Product']['price']; ?> VNĐ</span></li>
            <li class="giamgia2"><?php echo $row['Product']['price_promotion']; ?> VNĐ</li>
            <?php endif; ?>
            <?php if(empty($row['Product']['price_promotion'])): ?>
            <li class="giamgia2"><?php echo $row['Product']['price']; ?> VNĐ</li>
            <?php endif; ?>
            <li class="ct"><a href="/san-pham/chi-tiet/<?php echo $row['Product']['id']; ?>-<?php echo $row['Product']['alias']; ?>.html"><img src="/img/chitiet.gif" /></a></li>
            <li class="ch"><a href="/san-pham/chi-tiet/<?php echo $row['Product']['id']; ?>-<?php echo $row['Product']['alias']; ?>.html"><img src="/img/chonhang.gif" /></a></li>
          </ul>
          <?php
            $row_index++;
            if(($row_index == 4 ) || $i == ($total_product)){
                echo '</div>';
               $row_index   =   0;
            }
            $i++;
            endforeach;

            ?>
            <?php echo $this->element('paging', array('paging'=>$this->Paginator));?>
        </div>
      </div>
    </div>
  </div>
</div>
